# -*- coding: utf-8 -*-
"""
Custom hook for cv2
"""
from PyInstaller.utils.hooks import collect_data_files, collect_submodules

# Collect all cv2 submodules
hiddenimports = collect_submodules('cv2')

# Collect cv2 data files
datas = collect_data_files('cv2')

# Add specific cv2 imports
hiddenimports += [
    'cv2',
    'cv2.cv2',
    'cv2.cv2.cv2',
    'cv2.cv2.cv2.cv2',
]

print(f"CV2 hook: {len(hiddenimports)} hidden imports, {len(datas)} data files")
